<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>样式class数组绑定</title>
    <style>
        .activated {
            color: red;
        }

        .activeOne {
            font-size: 20px;
        }
    </style>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
        <div @click="clickDivHandle" :class="[activated, activeOne]">
            Hello World ...
        </div>
    </div>
<script>
    // 数组可以设定多个样式
    new Vue({
        el : "#app" ,
        data : {
            activated : "",
            activeOne : "activeOne"
        },
        methods : {
            clickDivHandle : function(){
                this.activated = this.activated === "activated" ? "" : "activated"
            }
        }
    })
</script>
</body>
</html>